declare namespace h = "http://www.w3.org/1999/xhtml";
declare namespace xf = "http://www.w3.org/2002/xforms";

let $opt := (util:declare-option("exist:serialize", "media-type=text/xml"))
let $id := request:get-parameter("id","dataInstance1.xml")
let $editor := doc("/db/xrai/cv/views/editor.xml")
let $path := concat("/exist/rest//db/xrai/cv/data/",$id,".xml")
(: Aleria Delamare      0F5530EA-20A8-CC34-0E32-52EE1FB0BCB8   :)
let $node := $editor//xf:instance[@id='data-instance']
let $update := (update value $node/@src with $path)
return $editor
